package com.cxs.mapper;

import com.cxs.pojo.Report;
import com.cxs.pojo.ReportExample;

import java.util.Date;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface ReportMapper {
    long countByExample(ReportExample example);

    int deleteByExample(ReportExample example);

    int deleteByPrimaryKey(Integer reportId);

    int insert(Report record);

    int insertSelective(Report record);

    List<Report> selectByExample(ReportExample example);

    Report selectByPrimaryKey(Integer reportId);

    int updateByExampleSelective(@Param("record") Report record, @Param("example") ReportExample example);

    int updateByExample(@Param("record") Report record, @Param("example") ReportExample example);

    int updateByPrimaryKeySelective(Report record);

    int updateByPrimaryKey(Report record);

    /**
     * 今日门诊人数
     * @return
     */
    Long countByToday();

    List<Report> selectListByCondition(@Param("code") Integer code, @Param("keyword") String name);

    @Select("select * from report where phone = #{phone} or carid = #{carid}")
    List<Report> selectByPhoneOrCarid(@Param("phone") String phone, @Param("carid") String carid);

    List<Report> selectListByKeyword(@Param("keyword") String keyWord);
}